package com.icangya.DAO.impl;

import com.icangya.DAO.IRwBuyCarDAO;
import com.icangya.DAO.IRwGoodOrderDAO;
import com.icangya.domain.RwBuyCar;
import com.icangya.domain.RwGoodOrder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RwBuyCarDAOImpl extends  BaseDAO<RwBuyCar> implements IRwBuyCarDAO {


    Logger logger = LoggerFactory.getLogger(this.getClass());


    @Override
    public List<RwBuyCar> getCarEveryGoodsByUserid(long userid) {

        String hql=" FROM RwBuyCar bugcar where bugcar.userid = ? ";

        List<RwBuyCar> list=(List<RwBuyCar>) getHibernateTemplate().find(hql,userid);

        if(list.size()>0){
            return list;
        }
        return null;

    }


}
